package spring.lottery.controller.param;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import static spring.lottery.dao.enums.PrizeTier.*;

@Data
@Slf4j
public class ActivityPrize {
    private Long prizeId;

    private Long prizeAmount;

    private String prizeTiers;

    public String getPrizeTiers() {
        if ("FIRST_PRIZE".equals(prizeTiers)) {
            return FIRST_PRIZE.getDesc();
        }
        if("SECOND_PRIZE".equals(prizeTiers)) {
            return SECOND_PRIZE.getDesc();
        }
        if("THIRD_PRIZE".equals(prizeTiers)) {
            return THIRD_PRIZE.getDesc();
        }
        log.error("奖品的参数类型不合法 prizeTier {}",prizeTiers);
        return null;
    }

}
